package com.xyf.sys.service.impl;

import com.xyf.sys.domain.Delivery;
import com.xyf.sys.mapper.DeliveryMapper;
import com.xyf.sys.service.IDeliveryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author R-H
 * @Date 2024/2/201825
 * @Description
 */
@Service
public class DeliveryServiceImpl implements IDeliveryService {

    @Autowired
    private DeliveryMapper mapper;

    @Override
    public List<Delivery> getList() {
        return mapper.selectAll();
    }

    @Override
    public Delivery get(Long id) {
        return mapper.selectByPrimaryKey(id);
    }

    @Override
    public Delivery getConfig(String deliveryId) {
        return mapper.selectByDeliveryId(deliveryId);
    }

    @Override
    public void update(Delivery delivery) {
        mapper.updateByPrimaryKeySelective(delivery);
    }
}
